.class public Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;
.super Ljava/lang/Object;
.source "EdgeIntersectionList.java"


# instance fields
.field edge:Lcom/vividsolutions/jts/geomgraph/Edge;

.field private nodeMap:Ljava/util/Map;


# direct methods
.method public constructor <init>(Lcom/vividsolutions/jts/geomgraph/Edge;)V
    .locals 1

    .line 53
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 49
    new-instance v0, Ljava/util/TreeMap;

    invoke-direct {v0}, Ljava/util/TreeMap;-><init>()V

    iput-object v0, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->nodeMap:Ljava/util/Map;

    .line 54
    iput-object p1, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->edge:Lcom/vividsolutions/jts/geomgraph/Edge;

    return-void
.end method


# virtual methods
.method public add(Lcom/vividsolutions/jts/geom/Coordinate;ID)Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;
    .locals 1

    .line 64
    new-instance v0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;

    invoke-direct {v0, p1, p2, p3, p4}, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;-><init>(Lcom/vividsolutions/jts/geom/Coordinate;ID)V

    .line 65
    iget-object p1, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->nodeMap:Ljava/util/Map;

    invoke-interface {p1, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;

    if-eqz p1, :cond_0

    return-object p1

    .line 69
    :cond_0
    iget-object p1, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->nodeMap:Ljava/util/Map;

    invoke-interface {p1, v0, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-object v0
.end method

.method public addEndpoints()V
    .locals 5

    .line 101
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->edge:Lcom/vividsolutions/jts/geomgraph/Edge;

    iget-object v0, v0, Lcom/vividsolutions/jts/geomgraph/Edge;->pts:[Lcom/vividsolutions/jts/geom/Coordinate;

    array-length v1, v0

    add-int/lit8 v1, v1, -0x1

    const/4 v2, 0x0

    .line 102
    aget-object v0, v0, v2

    const-wide/16 v3, 0x0

    invoke-virtual {p0, v0, v2, v3, v4}, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->add(Lcom/vividsolutions/jts/geom/Coordinate;ID)Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;

    .line 103
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->edge:Lcom/vividsolutions/jts/geomgraph/Edge;

    iget-object v0, v0, Lcom/vividsolutions/jts/geomgraph/Edge;->pts:[Lcom/vividsolutions/jts/geom/Coordinate;

    aget-object v0, v0, v1

    invoke-virtual {p0, v0, v1, v3, v4}, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->add(Lcom/vividsolutions/jts/geom/Coordinate;ID)Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;

    return-void
.end method

.method public iterator()Ljava/util/Iterator;
    .locals 1

    .line 78
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->nodeMap:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v0

    return-object v0
.end method
